#
# Copyright (c) 2025 Huawei Technologies Co., Ltd.
# openUBMC is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
#         http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
#

"""
嵌套函数代码生成模块

将嵌套函数编译为C++的各个子模块。
"""

from .struct_generator import (
    AsyncFunctionStructGenerator,
    FunctionStructGenerator,
    add_function_struct_to_context,
)
from .async_code_generator import AsyncCodeGenerator
from .control_flow_generator import ControlFlowGenerator
from .type_inference import get_await_result_type, get_local_var_type
from .code_analyzer import (
    has_undeclared_local_vars,
    collect_local_var_definitions,
    has_break_in_statements,
    has_continue_in_statements,
)
from .utils import (
    get_functor_name,
    fix_global_async_struct_call,
    indent_code,
    nested_body_generator,
)

__all__ = [
    "AsyncFunctionStructGenerator",
    "FunctionStructGenerator",
    "add_function_struct_to_context",
    "AsyncCodeGenerator",
    "ControlFlowGenerator",
    "get_await_result_type",
    "get_local_var_type",
    "has_undeclared_local_vars",
    "collect_local_var_definitions",
    "has_break_in_statements",
    "has_continue_in_statements",
    "get_functor_name",
    "fix_global_async_struct_call",
    "indent_code",
    "nested_body_generator",
]
